win32: on focus restore the window if iconified
authorYevgen Muntyan <muntyan@fastmail.fm>
Mon, 8 Feb 2016 08:24:12 +0000 (09:24 +0100)
committerIgnacio Casal Quinteiro <icq@gnome.org>
Mon, 8 Feb 2016 11:58:58 +0000 (12:58 +0100)
If the window is iconified we want to restore the window
to get the proper size instead of showing it normal which
would change the size of the window.

https://bugzilla.gnome.org/show_bug.cgi?id=698652

gdk/win32/gdkwindow-win32.c

index d04bb6973f0b6b4a2e058f6f02a04aa4730d8759..74b19df797b8d9f730db183b9854caa462e8c254 100644 (file)
@@ -2994,8 +2994,11 @@ gdk_win32_window_focus (GdkWindow *window,
 
   if (window->state & GDK_WINDOW_STATE_MAXIMIZED)
     ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWMAXIMIZED);
+  else if (window->state & GDK_WINDOW_STATE_ICONIFIED)
+    ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
   else
     ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
+
   SetFocus (GDK_WINDOW_HWND (window));
 }